Javascript backend for OPT