Wrote and tested little auxiliary function to find index of maximum value.
Finding best fret should work, but needs a bit more testing.
Ignore useless vim residue...