Replaced function object comparator with lambda function.