Updated makefile with new source files
Refactored to deal with some replotting issues and general code cleanup