fixing to pass jshint
fix to get codemap showing
fix to handle scratchpad double-click better