Refactored save and read to/from memory
Memory saving and reading for bytes, words, dwords and qwords