Added a psort method to make it possible to sort a list of objects by a property value.