add option for dom scope
TODO create a flat schema on init