Simplify type annotations. Add test file.