cleaning up some tests and adding type hints