cleaning up ellipse code