Adjust JS to use new API actions and methods