Code cleanup in Domain