Refinements and correct way of creating domain classes.