Debug error: `extended_valid_elements` undefined

* Fixed a debug error complaining about `extended_valid_elements` undefined in `add_valid_tiny_mce_elements`
* Coding style and formatting cleanup