Added delay code. It's currently not playing back correctly when using delay.tick(). May be a thread issue?