fix dll counting bug, shift() call, add Queue class and tests