Fixed EMA random-time scheduling bug. More unit testing.