Introduced formal method for selecting Iq estimation algorithm, and tidied up code a bit