move and fix common string operations
change lambda_transition signature
many changes around output labels fixing