Added quality and sort stuff