Corrected sma calculation in kernel.c; set periodogram display from javascript.c