Add maxing order to commonGetLayers.
Fix cueListWrite format.