More architecture changes, unit tests.