Packaged, made thread safe, added option for expanding moving average window, improved documentation, added tests