clean up the make file and sensible ordering