Cleaned up drawing code.