Cleanup 77
Implement restricted size partitions:
- Use it in 31 and 77.
- Rename unrestricted partition function.