Added application state monitor.