Removed a lot of useless comments and fixed a bug where we would get an exception if the user clicked out of bounds on the browser dialog window.