Minor refactorings and some more code regarding OAuth specs