Various code generation fixes + HTML spec update.