Ctrl-q added for quit and minor code changes.