Make sure list view items are sorted alphabetically & clean up code somewhat