Moved address formatting logic to separate function. Added unit testing to prevent regression.
Merge pull request #286 from phillipCouto/address_formatting

Moved address formatting logic to separate function