Add missing license header,
Fix compiler warnings relating to generics.