Add a function to generate callback for error case
Change callbacks for error to use the generator
Add callbacks for setRemoteDescription method

Without this remote view is not showed properly.