Added unit tests for the Queue class.  Also minor refactoring to make testing easier.