* clean up code and implement best practices:
- `type(a) == list` replace with `isinstance(a, list)`
- `adict['key']` replaced with `adict.get('key')`
- annotation `-> list` replace by more accurate `-> list[dict]`
* improve compatibility with previous python versions with Typing
* little fix