Fleshed out XMeansWrapper API -- written but not tested. See TODOs in file.