Restructuring things a bit, and cleaning up the makefile.