Makefile changes to file struture and minor changes to functionality