remove comments and console.logs
remove redundant cursor closing statement