Small refactor to make the xbee reader more configurable