Small changes and added simple exp. avg.