Factor dashboard helper methods.

Exact same functionality, less lines.