Refactor dataset.
Merge pull request #110 from jharding/dataset-refactor

Dataset refactoring