Cleaned up oauth code.