Refactored UserAgentHeader class
Merge master into stable