Added unit tests and improved detection of mobile WebKit browser version.