Even more refactoring