Changesets: Encapsulating common code

This addresses feedback in #2494 and fixes #2496