Add pool + fix a bunch of stuff related to cursor/connection