more package refactoring; separate Makefiles for each package