Some minor changes to mdl.R file.