Added 'reference' in xml attributes and modified attribute names

I resisted the temptation to change all brackets... XD