Made refactoring of connection_manager
Deleted unnecessary functions, they do not work that way.
Added necessary parameters to [ack, error, result] callbacks for the use of js_injector