Many bugfixes. Still some weirdness going on in html output, weird images out of place