Editing mrt_functions.py

Cleaning and commenting