Move bar-drawing and colour resetting to utils