prettify html. fixed bugs