Minor changes to makefile.
Fixed the tests after refactoring.