Improve MDD API and add new tests