Updated to latest js refactor