Some sync refactoring

- Use only one dict for storing all temporary state of a storage
- Rename functions to be internal
Fix dead doubleclick testcase

click.CliRunner swallowed all exceptions, also AssertionError