Changed the raphael renderer for an easier to use d3js.
Rendering function still needs to be broken down into smaller functions and properly tested but at least this works.
Bracket styling is horrible, will need to improve this.
Keeping raphael around as I have plans for it.