Refactoring of #6 as there is a lot of code smell linked to the edit functionality of the ellipse tool