added doc_expansion setting to default settings object. It is now passed through the view to the template