small refactor to db class
settings & test file
tests