dashboard code clean up