Cleaning up stream sorter code, removing all __typeof__.