Fixed bug with "undefined" appearing in address

Stored data.location object in local var to reduce continuous access.
Stopped "undefined" from appearing in address string by filtering out
location properties that have a value of undefined then building the
address string from those values.