Reformat code, properly use Hooks
Fix "undefined index" error. This makes the plugin work without the GeoIP plugin.

Please deactivate and uninstall the GeoIP plugin and use the integrated geolocation features.

fixes #1