Refactorings + code to train models and pick best ones.