Use KeyValueStore code for Config class
Delete useless types.py
Remove globals
Add block_size param to CommandNode
Better stream handling