Changed TrainingSet class to TrainingStack and changed the underlying
data structure to be a stack rather than a Hashset.