We definitely will want to avoid duplicating all this code from the dashboard controller. Haven't fully thought yet about what the best approach to that is, but I'll think about it more later.