Small tidying of the xml controller

clean up of the xml controlller, missing docblocks, indentation, etc .. set up the action array like other files
Also fix for a missing require in the mail preview (called by the xml controller)