Extracted initialization to demo.js