Remove trailing whitespace and unnecessary backtick from edit tree view