Only keep one copy of send code
Implement different averaging periodds defined by a shared constant array