Added MinBy and MaxBy from the MoreLINQ library (their version was better than the one I wrote initially).