Clean up the makefile.
Big makefile and structure refactor.