More tests for the openwire code, move some bits around.