Eliminate many instances of reflection via type hints