Removed old test code

A few unused variable declarations (some of which require crawling the
DOM tree) were removed.