Added the loop functionals as well as the ms and mt things

self explanatory again