Cleaned up dashboard code