Remove dependence on reflection