minor fixes
new trains and cpp circular buffer