Apply more generics, where is applicable