fixed a few issues and redid the makefile