Changed the layouts a little. Found a bug where the data was being received in separate packets due to size of the rosters. Fixed this by appending the data each time didReceivedData is called. The parsing is now done in connectionDidFinishLoading.