Added support for auto-resize, fix sorting in the tester