more refactoring work
db refactor stuff