Split smart_worker.js into multiple files