There are a few instances in the code where mypy is unhappy and we have added #type: ignore comments to bypass the issue rather than fix the underlying error. We should remove these and implement proper type hinting where possible. There may be instances where trying to accommodate mypy is impossible or more cumbersome than just leaving in the #type: ignore comments, but in these instances we should add comments explaining why.