Solidify API with typing

We should add typing to our API.

https://docs.python.org/3/library/typing.html