Replace "viewsize" with "viewWidth" and "viewHeight"
Replace "statesize" with "stateWidth" and "stateHeight"
Rename uniform variables passed to fragment shaders
Rename getPixelChannels() function to getPixelColour()
Create and use textureUnitIndex variables in step() and draw()
Add comments to step() and draw()