fixed some directory stuff with the makefile
moving variable declarations around