Refactor: js in file