Refactored to use common Engine, MsgSet and DSL framework