Updated confusion matrix for D3 demo
Some cleanup and refactoring