JS refactoring and aboutScarab