Refactor and add base class for DB managers
Change standard context allocation