Review code for indentation
Check with assert (kind of defensive programmation) that each XBee command returns 'OK'
Clean code