Work-in-progress for fixing generic types
Merged
Fixed merge errors