refatoring domain classes