Separated training set and validation set. Also made more changes to the indexing system to disentangle model building from model training.