Made the training and testing occur in the same class for easy
manipulation of training variables.