renderqueue sorting and other work