Instead of moving this into a method, I think this key-appending logic is best refactored. I know I copy/pasted it a couple times throughout the class. That was going to be the first place I hit when I planned on refactoring this.