Add html output and fix some erros