Updated and organized snap.js