Put macrorun list logic into a library function.