Removed unused params and fixed inference for generics in a few places