Implemented application quit on window close