Add scalacheck generators and a reference api to make testing easier and more useful