More cleanup to repartitioner

Fix varible names, typos add comments