All the code for DMT tutorial