external cleanup and added makefiles