Fixed selection sort, refactored sort prop to name prop