Various extra functions for cue and layer

Mostly small adjustments