input type checking is handeled in MovingAverage
code-style changes
simplify param type-checks