Initial work on XML variables
Fix permissions