improvements to xml/json rendering for model