Much more xbee code.
Make XBee work as a PiSocket.
Switch to using the XBees.