Added an helper method to copy fields between classes.