Move DB connections from State to Reader monad.