Added reconnect, disconnect and emit functions