Refactor classes Settings and Calculate.