Remove debug lines, enable rewrite