Clean up the element drawing API a little.