Refactor paint gizmo math
Don't leak textures
Saving actual image data after painting