Added support for queuing stubs. Closes #1.