Refactored addGroup_directive to use element.css(styleObj)