misc fixes (code style, type hinting, etc.)
Merge pull request #702 from arnaudbey/master

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