Resolve "cleanup: beam envelope tracker"
Closes #461 (closed)
The objective of this MR is not to review the Envelope Tracker but to cleanup the code. In particular making the bet/math stuff more C++ like.
Cleaning up more in math doesn't make much sense since we have to replace this anyway.