Some more refactoring...