More refactoring to support dashboards