Implemented service scopes from RFC 195.
Added documentation for utility classes and functions.
Added more documentation for API version 2.