1001 & 1009 | Reformatted all code with intellij idea. Redrawing the graphwhen user preference for kpi is updated.