update template and style
some refactor
update style
fix error path