extract DSL module and some minor edits