Primarily formatting, exception raising, and documentation changes.
Fixed pep8 issues.
Merge branch 'master' into yaserkl
Merge branch 'yaserkl'