improve debugger and documentation