Added frameDelay and changed previousFrame initial value.