Minor refactoring stuff.