more refactor - db
refactor - end of controllers