Previous message about not working was due to problem in external library. Removed some debugging print statements. Now using boost's foreach to clean up some of loops over stl containers.