Eliminate some reflection via adding type hints, and correcting one