clean up documentation and type hinting