Eliminate a few instances of reflection via type hints