Code cleanup in preparation to explore HIM procedure.