Required header in main.js and updated demos