Removes debug lines. Adds text flip