ROOMS-497: Add simpletest support and clean code