Cleaning up and documenting oauth code
Still to do:
- remove dependencies on outside libraries
- create unit tests