Started refactoring according to the new design model.