Added tests and hostmaster database controller.