Update set_object() to pass in config array (with optional 'class' key)