Starting and Exiting the Application