Fixed some more bugs. Probably done modifying MDML for this week