Moved the main code to ChangeFragment.