Consolidated drawing code