Add a function to get state information.
Add a simple handler for showing state information.