Some more refactoring!