fixed some partition count logic and added notes on a couple TODOs