Fix proper use of generics in services and collection