Clean up build, add more tests.