Bug fix and potential feature addition

The first commit addresses a bug with the abort functionality; check the commit for details.

The second commit is a first attempt at adding a means to empty out the queue. The implementation isn't great, but it works.