Converted hard-coded behaviors into options. Added code to set a name attribute based on the xml node name