Perhaps now would be a good time to refactor this?