AND and DocSim for Comac, minor changes elsewhere