Handle edge cases for browser type, add more comments shell script.