Modifying to work with Geometry and Problem structures.