Application State Control Functions

Includes functions for application state control.