Reformat modal JS, remove useless resources from demo popup

To check it's all good, launch a demo.