high availability factories and delegates implemented. Also added prepare statement ready for persist