Add event queuing.
Update unit tests.

Refers to enhancement #4