remove some debug lines, add/fix documentation