Feature/decouple js sdk

@jjackson26 @swarajban Path changes to support decoupling.
I think there are a few more places in this file that need to be changed