Added browser environment detection and test
Merge