Not sure what Matt did here.
Merged Matt's changes with mine regarding main function in train.py.