Move backend common code to app init