restructure communities module