Fixed bug in smoothing filter, added functions to data