use correct "afterinit" callback instead of deprecated "initcomplete"
don't needlessly initialise variables in AddOption call
use json response instead of xml in google geocode request