wrap db connection in factory, eliminate global variables
remove base path global, update README
unit test for user