Fixed <pre> tag generation. Other tweaks.