Make use of generics to avoid warnings.