Added ability to sort first N or all events