Move the panel HTML code where it must live.
Remove error in JS
Use strict everywhere.