Some refactoring and prettyfying

Assuming FRAM reads and writes work, it should be
good to move on to writing the heap.