Tests and small improvements on Queue