Phase 3 implemented.
Pointers to partitions are broken by the realloc. However I don't think
we even really need to keep them around. Either way it needs to be fixed.
Phase 4 implemented.
Also some refactoring to allow for pointers to partitions to be updated.