Minor refactor for location handler.