Refactored db contexts further