Coding style consistency

Thanks for merging my other PR! I really appreciate the positive feedback.

This just contains code style and consistency changes, most of which are related to the compatibility updates from my previous PR.

None of this is strictly necessary (and nothing here affects runtime), but it makes the codebase ever-so-slightly nicer to work with.