Cleanups and potential fix sorter