sort_mt: code cleanup