Master - Name check & Duplicate code removed & Makefile modification
Removed some duplicate code and added a function that checks the names on creation/renaming.
I also changed the makefile, since if one encounters problems on building (like me) one has to manually run "make clean" before reattempting.