Remove hard-coding from dashboard, factor the template a bit