Add clearImmediate and tests.