Callback cleanup

Added callback to connect() method, and use setImmediate() to call callbacks.

Also, added setImmediate() calls to return errors for unimplemented methods.