Add tests for Dataset, cleanup source files