Finished simple re-partitioning, fixed all compile errors