Fixed issue #128 and refactored XHTML plugin.