Did some performance tweaks to the drawing code.