Fixed mistakes in TrendGenerator. TrendGenerator should be changed to use
ScheduledExecutorService instead of Timer.