Updated smart.js