Added create_sets function

This function creates the training and test sets. Made a slight change
in the extract function where the label is an integer only and not an
array.