OnRender method cleanup