Refactor, move domain objects into domain