refactoring, cleanup in mashprofiles.py