Change block list iteration to use a macro