Yep, I was going to try and factor some of it out. I've left a note in the PR up at the top but I'm not sure if that is where I want to go with this yet.