Cleaned safi.js