Code cleanup in the dashboard