Sort boxes and misc tweaks.