Shift to using Chartjs (woo). Move more login to models. Fix stupid analysis inclusion.