Small change in mast.py. More changes forthcoming