refactor(remote): split up and initialize inside the module
refactor(remote): externalize state in api
refactor(remote): externalize state in helpers
refactor(remote): externalize state in remotestore