Add init code to make it easier to provide a common db connection
General refactors + Change initializer orders to enable usage of common db connection from config