Refactoring and new saving class.