Refactoring some more.