-Fixed some issues related to lists in combination with scopes and restricted sorts.
-Made the restricted sorts more restricting.
-Removed some dead code.
-Fixed an some issues with lists in combination with restricted sorts.
-Refuse to handle invalid restricted sort types.
-Allow TLSorts to be used like 'plain' sorts (eventhough it's not really necessary).
-Some cleanup.
-Corrected some field and parameter names.