Fixed various HTML tag nesting issues