Add comments and better browser detection.