A number of build changes, and one C++ style change.

Some infrastructure changes. I plan on adding unit tests for the existing code. This will be easier than taking the existing alpha 1 codebase and writing tests for it.