terminal.js: change constructor arguments; now using an configuration object.