Complete PomdpXWriter Class with tests