Default options support

Adds support for set_default_options and with_default_options.