Changed to use sub nodes instead of attributes