Adding db connection and tanent management.