sma refactoring, ema indicator, demo update