Some changes on functions frequencies, average and drop_every

Frequencies and drop_every look simple enough to me. Function average was quite not that easy to read.