Html to templates

should be merged as soon as tested