Mule 6992&mule 6991

Fixes for issues MULE-6991 and MULE-6992. Also the code was cleaned up a little bit so that the OAuth2 components no longer carry unused code