DocStruct: replaced config dicts with objects.
DocStruct: fixed a few bugs related to instance launch