Modularity by partition was wrong, so I fixed it.
Fixed docstrings and removed some comments
Various changes to the code. New __iter__, and new unused_key.
no dependence on random module.
Modularity of partition now correct. Other minor changes.