numVertexPartitions and numEdgePartitions are now part of the
constructor and are immutable.

Also done some cleanups.