Refactoring choice of geometries without Ajax call.