Fixed xml issues, improvements for adding categories:
'