Replaced calculateMaxCoord with short form, added callbacks for location