won: js refactoring, sorting;