Using class instead of struct as struct return by value rather causing issues with mutablity