Improvements to makefiles