Fixed drawing code and updated store and read instructions with undocumented sideeffects.
Also removed some unneccesary debug output.