Move render and redraw methods in app_context classes into a base class.