Consolidate infrastructure for testing

The purpose of this milestone is to consolidate the infrastructure for testing, so that test can be run at a regular basis. This is an important step toward quality assurance, and test-driven development.