add smart.json, history and cleanup package.js