Refactoring to help with jdbc library issue