Better event filtering and sorting