Enabled the application to use OAuthAuthorization.
Refactoring
Added some unit tests