add back sparkline and cleanup JS