Output to html and some other stuff