Some slight refactoring to make my life a bit easier