Added uncommitted relation icons

This includes some code reorganization to be more in line with D3 style and to make the relation rerendering easier to work with.
The above changes make it so that drawRelation is acting on the entire relation, rather than just the line, which was messy.