Html factory class to create types with arbitrary implementation