Replace the Sparkline library & fixes for the n+1 issues in activity.php