Added unit tests, hooray!