Now with unit tests.