Extract analytics, footer and bottom scripts into templates (solves #4)