docs and removed commented debug code