Merge pull request #308 from trett/master

[bearermanager] total refactoring