Added unit test; clean up