revamp init for better performance and restart capability, as well as fixed db connection issues and redis connection issues
forgot single end