Writes to memory in parser now working.

The parser now writes to memory correctly. The one issue I am still
having is understanding the byte count and implementing it correctly.
Will take a closer look later today.