Moar minor refactoring