New test for protocols and generics and a couple minor cleanups