Fix places where I wasn't using start offset.
Fix a number of byte masks and reduce duplication.