Working on refactoring.