Code clarity changes to xray.js
Add specs
Fix specs for changes to spacing in template comments