Added some tests and helper methods