Even more refactoring!