Remove unnecessary calls and return xml
Cleanup and add proper test