Revisions based on review

Mostly renaming and extracting a few smaller methods, along with using
better constants in the tests to clarify what values we're checking
against.