add support for graph-depth setting

- also remove unnecessary javascript
  console output.