Move attribute string into it's own method.