First steps at refactoring dashboard, needs work