Add type hints and a return type to all current functions - this will hopefully be presented on the documentation pages.