calibration first pass
refactoring and tidy up
updated igonre
d3 data input working