Fix IE7 problems with relative base href. Clean up COGS javascript.