Some small changes for speed/documentation purposes
Fix some of the bad logic, and also fix a bug wherein we were not verifying partition_range_maxk got good arguments
Small cosmetic changes
Cosmetic changes