Finish changing JS api