Separated out prediction and training in different files.
Tried parallelization - but doesn't seem like it's working yet.