- refactor js application