improve average lag calculation
optimize SVG images