move analytics to head and clean up whitespace