Ported dsl module from fostom project