Add sorting and the method setNilValueForKey