encapsulating dbPath and entity formatter in a Database object
making a single generic dao for both entities
other refactorings
check Main class to see how it's called