As I mentioned above, I wanted to avoid having to do this in multiple places. If this is a bit too much refactoring I'll remove it.