Changed log output to HTML, implemented all events except QUIT