Partition refactored to use partitioner object