Added splitting into test and training sets