I have the feeling this whole thing could be a one-liner (or 3-liner) with some `_` collection functions.. probably _.chain().map().max().indexOf() or something similar