Removed redundant tolower
Fixed Makefile bugs
Makefile fixes