 		{
 			return _connection;
 		}
+
 		public function set connection( value:XMPPConnection ):void
 		{
 			_connection = value;
-			_connection.addEventListener(PresenceEvent.PRESENCE, handleEvent);
-			_connection.addEventListener(LoginEvent.LOGIN, handleEvent);
+			_connection.addEventListener( PresenceEvent.PRESENCE, handleEvent );
+			_connection.addEventListener( LoginEvent.LOGIN, handleEvent );
 			_connection.addEventListener( RosterExtension.NS, handleEvent );
 		}
-		
+
 		public override function set filterFunction(f:Function):void
 		{
-			throw new Error("Setting the filterFunction on Roster is not allowed; Wrap it in a ListCollectionView and filter that.");
+			throw new Error( "Setting the filterFunction on Roster is not allowed; Wrap it in a ListCollectionView and filter that." );
 		}
 	}
 }

		 */
		public function setPresence( show:String, status:String, priority:Number ):void
		{
			//var tempPresence:Presence = new Presence( null, null, Presence.AVAILABLE_TYPE, show, status, priority );
			var tempPresence:Presence = new Presence( null, null, null, show, status, priority );
			_connection.send( tempPresence );
		}
		
		/**
		 *
		 * @param	resultIQ
		 */
		public function fetchRoster_result( resultIQ:IQ ):void
		{
			// Clear out the old roster
			removeAll();
			try
			{
				disableAutoUpdate();
				for each(var ext:RosterExtension in resultIQ.getAllExtensionsByNS( RosterExtension.NS ))
				{
					for each(var item:* in ext.getAllItems())
					{
						//var classInfo:XML = flash.utils.describeType(item);
						if (!item is XMLStanza)
						{
							continue;
						}
						
						var askType:String = item.askType != null ? item.askType.toLowerCase() : RosterExtension.ASK_TYPE_NONE;
						addRosterItem( new UnescapedJID(item.jid), item.name, RosterExtension.SHOW_UNAVAILABLE,
							"Offline", item.groupNames, item.subscription.toLowerCase(), askType);
					}
				}
				enableAutoUpdate();
				
				// Fire Roster Loaded Event
				var rosterEvent:RosterEvent = new RosterEvent(RosterEvent.ROSTER_LOADED, false, false);
				dispatchEvent(rosterEvent);
			}
			catch (e:Error)
			{
				trace(e.getStackTrace());
			}
		}
	
		/**
		 *
		 * @param	resultIQ
		 */
		public function addContact_result( resultIQ:IQ ):void
		{
			// Contact was added, request subscription
			requestSubscription( pendingSubscriptionRequestJID );
			pendingSubscriptionRequestJID = null;
		}
		
		/**
		 *
		 * @param	resultIQ
		 */
		public function unsubscribe_result( resultIQ:IQ ):void
		{
			// Does nothing for now
		}
			
		/**
		 *
		 * @param	eventObj PresenceEvent, LoginEvent or RosterExtension

				subscription = RosterExtension.SUBSCRIBE_TYPE_TO;
				askType = RosterExtension.ASK_TYPE_SUBSCRIBE
			}

			var tempIQ:IQ = new IQ( null, IQ.SET_TYPE, XMPPStanza.generateID( "add_user_" ),
									callbackMethod, callbackObj );
			var ext:RosterExtension = new RosterExtension( tempIQ.getNode() );
			ext.addItem( id.escaped, null, displayName, groupName ? [ groupName ] :
						 null );
			tempIQ.addExtension( ext );
			_connection.send( tempIQ );


			addRosterItem( id, displayName, RosterExtension.SHOW_PENDING, RosterExtension.SHOW_PENDING,
						   [ groupName ], subscription, askType );
		}

		/**
		 *
		 * @param	resultIQ
		 */
		public function addContact_result( resultIQ:IQ ):void
		{
			// Contact was added, request subscription
			requestSubscription( pendingSubscriptionRequestJID );
			pendingSubscriptionRequestJID = null;
		}

		/**
		 * Revokes an existing presence subscription or denies a subscription request. If a user
		 * has sent you a subscription request you can use this method to deny that request. Otherwise,
		 * if a user already has a granted presence subscription, you can use this method to revoke that
		 * subscription.
		 *
		 * @param	tojid The JID of the user or service that you are denying subscription
		 */
		public function denySubscription( tojid:UnescapedJID ):void
		{
			var tempPresence:Presence = new Presence( tojid.escaped, null, Presence.UNSUBSCRIBED_TYPE );
			_connection.send( tempPresence );
		}

		/**
		 * Fetches the roster data from the server. Once the data has been fetched, the Roster's data
		 * provider is populated appropriately. If the Roster-XMPPConnection class dependency has been
