Improved Dataset tests.
Also fixed a few bugs.