Added parser by James; separated cross-validation from training for better organization;