Made small fixes in JS and PY file. Will need to clear debug lines