Cleaned up drawing routines.

Improved drawing performance.