Moved the code loading changesets from state to its proper class.