Just some more refactoring