Add hook for triggering actions upon distinguish.
Pull debug footer out into its own template.

This allows plugins to override it.