Swapped to using makefiles
Minor fixes