Utilizing proper generator methods instead of gsub hacks