Added test to ensure closures come of the queue at the appropriate times.

Also reduced the execution times from seconds to milliseconds.