Ran a code inspection to tidy up spelling and fix a couple of issues - cursor.close() was complaining but I don't know why?