Made AccumulatorManager threadsafe, added custom accumulator to examples