Refacto, avoid duplicate html code