We should leave refactoring these to a future pull request, but whatever we can do to clean it up would be nice.