Beginnings of a modular layout and some skeletal unit tests.

Hooray for tests!