Cleaned up drawing code