Improved dialog handling, added UserAttribute
Fixes error in dialogAttributes
Improved factorisation in dialogAttributes