max_piece_type cleanup, and slight speed increase.

No functional change.

Resolves #81