tests, documentation, some code cleanup for dataset and ordertheory