Pool stats is now an array of stats, each time the pool is reconnected, the old stats are timestamped and new stats are inserted.
Rewrote frequency assigning - better and more readable code