Refactoring, Makefile, integration tests