More test methods and slight modifications to UglyQueue