Clean up ellipse index computation.