Algorithm and Giraph fixes (assorted).