Replace messy usage of class and instance attributes for configuration values with the Options container.

Refactor bits of documentation and code.
Fixed getting shadow_docs from protocol kwargs

Cleaned up utils.py a bit.