ported to mod_wsgi, added beautiful soup to fix non-xhtml compliant html