Added traintest - a function for splitting into training/testing sets.