Added unit tests and fixed formatting of domains