Update communities and inbox when there are changes, refactoring