Added support for saving memory images
The program counter is now part of the memory image