Added error logging in topnav.js and deleted some junk