Clean-up to admin dashboard code