Cleaned up code, added 'paint' blocks