fix comments and formats in engine.js