better xmlmap, minor cleanups