Generics

I have to ask why collection layers aren't generic.
More generics

Forgot T in some places
Merge pull request #2264 from CyberFoxHax/patch-2

Generics