JSDoc comments added to engine.js