Simplify makefile and make tests pass