Optimizations to snow.js