+autosort into main js, some other minor things