Refactoring continued..