improved html generator util class