xml clean up, json bug NOT fixed yet