Added a directive to work with the graph
Moved sigmajs event handlers into a custom directive