Move to BOOST_FOREACH (where applicable)