Remove double escaping and redundant nesting.