size[object_] := object[[1]]
value[object_]  := object[[2]]

total[knapsack_, vs_]  := Plus @@  value /@ vs[[knapsack]] (* total value *)
contents[knapsack_, vs_] := Plus @@ size /@ vs[[knapsack]] (* total size *)

(* no module to keep local definitions *)

Knapsack[vs_List, s_Integer?NonNegative] :=
    Module[{},
        ks[0, in_] = {};
        ks[n_, in_] := ks[n, in] =
            Module[{gn = size[vs[[n]]], k1, k2},
                k1 = ks[n-1, in];
                If[ in >= gn,
                    k2 =  ks[n, in - gn]; k2 = Append[k2, n];
                    If[ total[k1, vs] >= total[k2, vs], k1, k2 ]
                  ,
                    k1
                  ]
            ];
        ks[Length[vs], s]
    ]
