#6255 PR continuation; file cleanup; buncha fixes

This commit and PR is a continuation from [an earlier commit and PR] (https://github.com/edx/edx-platform/pull/6255) which had a number of issues stemming from an out-of-date branch. I had to checkout the updated branch and make a new branch off of it, cherry-picking the edits in.

The previous commit was confused as to what I edited and what was originally there, whereas this one has them broken out for easier PR reviewing.

Ping me with any questions as this is a weird scenario.

@talbs 
This is only so we can separate what I wrote versus what was there before. When approved, we can marry the two into a single file again.