Modified edge class to work with d3