Added MediaStream definitions.
added interfaces
basic test
fixed NaN bug, added moving averages for smoothing theta