Issue #147 - reduce boiler plate. added unit tests