Added possibility to close application.