code cleanup (mhat-by-SHA)