Revamping js sdk