properly close queues
update the tests
build
Merge pull request #48 from calvinmetcalf/close-queue

fixes #47