Began work on the dataset factory method

also cleaned some stuff up