Sorting selector lines.
Added story selector tests.