Eliminate a few instance of reflection via type hints