Added a call to format when creating more space on the heap.
Moved a couple calls around and produced a test that made it to the end WITH ERRORS