Cleaning up some tray icon related stuff.
Make current leaf count the primary sort in neighbours.
Max leaf count is only evaluated when current leaf count is equal.