Factor address attribute conversion into separate function, easier to read.