Debug plugin added; api::disconnect() bugs fixed; connect/disconnect events added