clean up code, improve performance, increase code coverage for dynamicEllipse.