Move the formatted address cleanup code to its own method.