Fix encoding issue, remove debug code, remove other no longer needed, rage-inducing code.