Persistent connections

Fixes #4