Refactoring to diamond inference usage and read only final fields.