changed db location
removed _inv count
removed _inv count, adjusted db location
added comments; changed file structure