Fix isSnap, and add snap.js file