Code reorg and add html template file
Tweak values and output
Tweak values