refactor browser handler

Browser handler reverted back to previously working version. 

I learned some Vim things while editing an interactive rebase file to merge this branch with master branch. 
![selfie-6](http://i.imgur.com/wnISU9A.gif)