cleanup helper functions
puts generic wax communication into a class
everything in xapi is in WaxCommunicator. tests pass
fixed state post bug