[SD] Refactor html code.