Fixed dialyzer errors

We can also think about incorporating `make dialyzer`  into tests that are ran with `make test`