Fix double click.
Removed extra spaces, update doc, remove unused vars.