Make database connections private in search class