Worked around bug with copying text from SSMS.  Implemented CTRL+A for select all.
fixed warning for unused variable and clarified status of this code.