Bug fixes and tests
Simpler Makefile