Standardise access to canvas in JS UI
Add JSON index to samples