consolidate scandata xml interaction and remove dead code.