Improved the tests, documentation, and Makefile generation