Update layering.js