Move more dashboard logic into the views