Refactors some improvements into the new files preview

Test plan:
  - Most of these things are code changes which likely won't
    cause any problems, but affect files as a whole so...
    you should likely follow the same test plan as found on
    https://gerrit.instructure.com/#/c/41451/

Change-Id: Ia7e03fd6936b7ef3efb48f21e0fb18f65d469189
Reviewed-on: https://gerrit.instructure.com/42180
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>