Fixed makefile and minor changes