* js refactorings