Completed the application logic.