Still more small changes
Partitioning code refactoring