Grouping or filtering items in menus

Arranging them all by rarity by default is acceptable, but I wish to be able to group similar items together as well as it will make things easier when comparing one Lasgun with all of my others, for example. Sidenote, having the arrange by “Name” option start at the /end/ is very jarring, perhaps reverse that?

For example, the Veteran ranged weapons could be categorized as follows:

Single Shot Lasguns
Multi-shot Lasguns
Charged Shot Lasguns

Las Pistols
Stub Pistols

Bolt Pistols

Full-auto Autoguns
Burst Fire Autoguns
Single Shot Autoguns

Shot Guns

Plasma Pistols