Changes to regs-site pull request #334 + changes that snuck in from pull request #335

All of these changes are either for conciseness (JS-esque) or because there is logic elsewhere that can be reused that you understandably didn't know about.

Unfortunately, some changes I made toward another pull request (https://github.com/eregs/regulations-site/pull/335) snuck in. I hope that, if you merge this, you don't mind reviewing them and adding them to the pull request.