Refactoring geoPHP code to FoxFire standards