Tidy `lib/engine.js`.