refactoring: Moved method that writes the baseModel