Moved scalar workings into new file
Improved Makefile