Beginning refactoring.