factored db connection to own namespace; added persistence to the classifiers