Moved common draw element methods into a base abstract class which the draw element classes inherit from.
Fixes for the midrawing test script.