Some code cleanup. Fixed the makefile.