Editing mrt_functions

Cleaning and commenting