Major rewrite to use pooler