Miscellaneous updates

- Some changes to OAuth to allow for better future ease of unit testing.
- Picked off a number of low hanging fruit warning updates, to clean up the project(s).
Fixing analysis warnings
Merge pull request #406 from khawkins/unstable

Miscellaneous updates