EllipsoidFactor: tidy up code by DRY principle