Code refactor, swapped to using DB connection pooling