Partened code up into more classes.