Ctrl-q added for quit and minor code changes.
Check flip state in closeChecks.