Updated for snap.js