Refactored to use always grid instead of pixels, just using pixels in the draw functions