Fixed computeCentroids; added andlogger.