Cleanup whitespace.
Fix attribute lookahead and allow add text to closing tags.