Restructuring sorting to add less clutter.