refactored utility fns from d3 to jquery + abstracted matrix builder
rolled back jquery integration to debug