Moving envelope analysis out of tracking function

There is too much too explore in the envelope to leave it with the
tracking stuff.