This is ugly as hell, but it looks like it's all required to get the page to work.