Refactor of changeset model, some lint errors fixed, tests, and more.

Refactor of changeset model, some lint errors fixed, tests, and more.