Change main code to use the different envelope modes.
Remove old code.