[comments] typo\
[fix] handle list sorting was broken: handles with same priority were not ordered correctly (handles added later should win over previous ones)
[clean] better variable names
[test] ocd
[test] dry