Optimizations to Database Connection & Fund Query