Fixes for #1958

Updated with more explanatory text. Also changed to use train_test_split function