Fix a few defects with the header and javascript