Further dashboard refactoring

Should not have functional changes.
More dashboard refactoring

Also, no functional changes expected. Just a better code layout.