Implemented promises and remoteHost