Fixed directories being referenced, added makefile, added conditions, and got rid of some bugs