Factor the last DRY violations in main.views out into the Smartfile backend.