Refactored the geometry editing panel so that it can be used in other places.