Slight coding style tweaks.
Started working on tests.