Cleaning up unused imports and adding type information to generics