misc fixes (code style, type hinting, etc.)