change structure of MMD.coffee to multiple model support