Proper generic usage
General refactoring