Checked some things in code, fixed bug in getMinMaxImpedance