Better handling of generics in implementation