Added cnt/index header generators and tests
Moved the Permute api to streams, added tests for laziness, and fixed all other broken tests