Added file saving when converting to xml
Added basic tests