Moved link stuff to custom directive
Added link attribute to set scope of directive