Improve support for headless UI

- Added callbacks to `activate` and `deactivate` which present the user the opportunity for setting up UI behavior at those times.

- Added a `hasChanged` method so the user can easily determine whether or not the user has made any changes.