Superficially cleaned-up and shortened some of the training code -- primarily by extracting methods.