Reformat some of the dashboard code