Added closure, removed global.quailTest calls.