fixed refkey attribute name
Added data-mode support