Finished conversion to raw js