Index: modules/uoa-connect-portal/trunk/src/app/community/community.module.ts
===================================================================
--- modules/uoa-connect-portal/trunk/src/app/community/community.module.ts	(revision 55400)
+++ modules/uoa-connect-portal/trunk/src/app/community/community.module.ts	(revision 55401)
@@ -2,8 +2,6 @@
 import { CommonModule }        from '@angular/common';
 import { FormsModule }         from '@angular/forms';
 import { RouterModule } from '@angular/router';
-
-// import{CommunityRoutingModule} from './community-routing.module';
 import{CommunityComponent} from './community.component';
 import {ResultsComponent} from '../searchEntries/results/results.component';
 
@@ -26,7 +24,6 @@
 @NgModule({
   imports: [
     CommonModule, FormsModule, RouterModule,
-      // CommunityRoutingModule,
     SubscribeModule, StatisticsModule, ManageModule, InviteModule,
     SearchZenodoCommunitiesServiceModule, ZenodoCommunitiesServiceModule, SearchFormModule
   ],
Index: modules/uoa-connect-portal/trunk/src/app/searchPages/communities/searchCommunities.component.ts
===================================================================
--- modules/uoa-connect-portal/trunk/src/app/searchPages/communities/searchCommunities.component.ts	(revision 55400)
+++ modules/uoa-connect-portal/trunk/src/app/searchPages/communities/searchCommunities.component.ts	(revision 55401)
@@ -102,7 +102,7 @@
    * @param params
    */
   private initCommunities(params: Map<string, string>) {
-    this.subResults = this._communitiesService.getCommunities(this.properties, this.properties.communitiesAPI).subscribe(
+    this.subResults = this._communitiesService.getCommunitiesState().subscribe(
         data => {
           let observables: Observable<boolean>[] = [];
           for(let i = 0; i < data.length; i++) {
Index: modules/uoa-connect-portal/trunk/src/app/searchPages/communities/searchCommunities.module.ts
===================================================================
--- modules/uoa-connect-portal/trunk/src/app/searchPages/communities/searchCommunities.module.ts	(revision 55400)
+++ modules/uoa-connect-portal/trunk/src/app/searchPages/communities/searchCommunities.module.ts	(revision 55401)
@@ -19,7 +19,7 @@
   declarations: [
     SearchCommunitiesComponent
   ],
-  providers:[CommunitiesService, SubscribeService, PreviousRouteRecorder, PiwikService],
+  providers:[ SubscribeService, PreviousRouteRecorder, PiwikService],
   exports: [
     SearchCommunitiesComponent
   ]
Index: modules/uoa-connect-portal/trunk/src/app/statistics/statistics.component.ts
===================================================================
--- modules/uoa-connect-portal/trunk/src/app/statistics/statistics.component.ts	(revision 55400)
+++ modules/uoa-connect-portal/trunk/src/app/statistics/statistics.component.ts	(revision 55401)
@@ -3,10 +3,7 @@
 import {Location, TitleCasePipe}     from '@angular/common';
 import {Title, Meta}                 from '@angular/platform-browser';
 import {DomSanitizer}                from '@angular/platform-browser';
-import {SafeResourceUrl, SafeUrl}    from '@angular/platform-browser';
 
-import {Observable}                  from 'rxjs/Observable';
-
 import "rxjs/add/observable/zip";
 
 import {EnvProperties}               from '../openaireLibrary/utils/properties/env-properties';
@@ -13,9 +10,6 @@
 import {ErrorCodes}                  from '../openaireLibrary/utils/properties/errorCodes';
 
 import {StatisticsService}           from '../utils/services/statistics.service';
-
-import {CommunityService}            from "../openaireLibrary/connect/community/community.service";
-import {CommunitiesService}          from "../openaireLibrary/connect/communities/communities.service";
 import {ConfigurationService}        from '../openaireLibrary/utils/configuration/configuration.service';
 import {PiwikService}                from '../openaireLibrary/utils/piwik/piwik.service';
 
@@ -33,7 +27,6 @@
 
 export class StatisticsComponent {
   public piwiksub: any;
-  public subfunders: any;
 
   public pageTitle = "OpenAIRE";
 
@@ -68,9 +61,6 @@
       private _meta: Meta,
       private _title: Title,
       private _piwikService:PiwikService,
-      private config: ConfigurationService,
-      private _communityService:CommunityService,
-      private _communitiesService:CommunitiesService,
       private _statisticsService: StatisticsService,
       private _configService: ConfigurationService,
       private titleCase: TitleCasePipe,
Index: modules/uoa-connect-portal/trunk/src/app/statistics/statistics.module.ts
===================================================================
--- modules/uoa-connect-portal/trunk/src/app/statistics/statistics.module.ts	(revision 55400)
+++ modules/uoa-connect-portal/trunk/src/app/statistics/statistics.module.ts	(revision 55401)
@@ -9,10 +9,7 @@
 import {StatisticsComponent, StatisticsForDashboardComponent} from './statistics.component';
 
 import {StatisticsService}           from '../utils/services/statistics.service';
-import {CommunityService}            from '../openaireLibrary/connect/community/community.service';
-import {CommunitiesService}          from '../openaireLibrary/connect/communities/communities.service';
 import {PiwikService}                from '../openaireLibrary/utils/piwik/piwik.service';
-import {ConfigurationService}        from '../openaireLibrary/utils/configuration/configuration.service';
 
 import {FreeGuard}                   from '../openaireLibrary/login/freeGuard.guard';
 import {PreviousRouteRecorder}       from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@@ -28,8 +25,8 @@
     StatisticsForDashboardComponent
   ],
   providers: [
-    IsRouteEnabled, FreeGuard, PreviousRouteRecorder, ConfigurationService,
-    PiwikService, CommunityService, CommunitiesService, StatisticsService, TitleCasePipe
+    IsRouteEnabled, FreeGuard, PreviousRouteRecorder,
+    PiwikService, StatisticsService, TitleCasePipe
   ],
   exports: [
     StatisticsForDashboardComponent
Index: modules/uoa-connect-portal/trunk/src/app/communities/communities.component.ts
===================================================================
--- modules/uoa-connect-portal/trunk/src/app/communities/communities.component.ts	(revision 55400)
+++ modules/uoa-connect-portal/trunk/src/app/communities/communities.component.ts	(revision 55401)
@@ -1,18 +1,9 @@
-import {Component, Input, Output, EventEmitter} from '@angular/core';
-import {ViewChild, ChangeDetectionStrategy}     from '@angular/core';
-import {ViewEncapsulation}                      from '@angular/core';
+import {Component} from '@angular/core';
 import {ActivatedRoute, Router}                 from '@angular/router';
-import {Location}                               from '@angular/common';
 import {Title, Meta}                            from '@angular/platform-browser';
 
-import {Observable}                             from 'rxjs/Observable';
-
 import "rxjs/add/observable/zip";
-
-import {ConnectHelper}                          from '../openaireLibrary/connect/connectHelper';
 import {EnvProperties}                          from '../openaireLibrary/utils/properties/env-properties';
-
-import {ConfigurationService}                   from '../openaireLibrary/utils/configuration/configuration.service';
 import {CommunitiesService}                     from '../openaireLibrary/connect/communities/communities.service';
 import {SubscribeService}                       from '../openaireLibrary/utils/subscribe/subscribe.service';
 import {CommunityInfo}                          from '../openaireLibrary/connect/community/communityInfo';
@@ -31,13 +22,8 @@
 
 export class CommunitiesComponent {
   public piwiksub: any;
-  public subfunders: any;
 
   public pageTitle = "OpenAIRE"
-
-  public communitiesResults = null;
-  public communitiesToShow = null;
-
   public researchCommunities = [];
   public researchInitiatives = [];
   public subscriberOfCommunities = [];
@@ -56,13 +42,11 @@
   constructor (
       private route: ActivatedRoute,
       private _router: Router,
-      private location: Location,
       private _meta: Meta,
       private _title: Title,
       private _piwikService:PiwikService,
       private _communitiesService:CommunitiesService,
-      private _subscribeService: SubscribeService,
-      private config: ConfigurationService) {
+      private _subscribeService: SubscribeService) {
 
           var description = "OpenAIRE - Connect, Community Dashboard, research community";
           var title = "OpenAIRE - Connect";
@@ -101,7 +85,7 @@
       this.subscriberOfCommunities = [];
       this.managerOfCommunities = [];
 
-      this._communitiesService.getCommunities(this.properties, this.properties.communitiesAPI).subscribe(
+      this._communitiesService.getCommunitiesState().subscribe(
         communitiesResults => {
           //this.communitiesResults = communitiesResults;
           //this.communitiesToShow = this.communitiesResults.slice();
Index: modules/uoa-connect-portal/trunk/src/app/communities/communities.module.ts
===================================================================
--- modules/uoa-connect-portal/trunk/src/app/communities/communities.module.ts	(revision 55400)
+++ modules/uoa-connect-portal/trunk/src/app/communities/communities.module.ts	(revision 55401)
@@ -2,8 +2,6 @@
 import {CommonModule}             from '@angular/common';
 import {FormsModule}              from '@angular/forms';
 import {RouterModule}             from '@angular/router';
-
-// import {CommunitiesRoutingModule} from './communities-routing.module';
 import {SubscribeModule}          from '../utils/subscribe/subscribe.module';
 import {ManageModule}             from '../openaireLibrary/utils/manage/manage.module';
 
@@ -14,7 +12,6 @@
 
 import {PiwikService}             from '../openaireLibrary/utils/piwik/piwik.service';
 import {ConfigurationService}     from '../openaireLibrary/utils/configuration/configuration.service';
-import {CommunitiesService}       from '../openaireLibrary/connect/communities/communities.service';
 import {ErrorMessagesModule}      from '../openaireLibrary/utils/errorMessages.module';
 
 import {SearchFormModule}         from '../openaireLibrary/searchPages/searchUtils/searchForm.module';
@@ -22,7 +19,6 @@
 @NgModule({
   imports: [
     CommonModule, FormsModule, RouterModule,
-    // CommunitiesRoutingModule,
     SubscribeModule, ManageModule, ErrorMessagesModule,
     SearchFormModule, BrowseCommunityModule
   ],
@@ -31,7 +27,7 @@
   ],
   providers:[
     FreeGuard, PreviousRouteRecorder, ConfigurationService,
-    PiwikService, CommunitiesService
+    PiwikService
   ],
   exports: [
     CommunitiesComponent
Index: modules/uoa-connect-portal/trunk/src/app/app.component.ts
===================================================================
--- modules/uoa-connect-portal/trunk/src/app/app.component.ts	(revision 55400)
+++ modules/uoa-connect-portal/trunk/src/app/app.component.ts	(revision 55401)
@@ -70,8 +70,8 @@
      this.propertiesService.loadEnvironment()
              .then(es => {
                  this.properties = this.propertiesService.envSpecific;
-
                  var communityId: string = "";
+                 this._communitiesService.updateCommunities(this.properties, this.properties.communitiesAPI);
                  if(this.properties.environment == "development") {
                    this.route.queryParams.subscribe(data => {
                      communityId = data['communityId'];
@@ -245,7 +245,7 @@
      var community = null;
      this.community = null;
      this.showMenu = false;
-     this._communitiesService.getCommunities(this.properties, this.properties.communitiesAPI).subscribe (
+     this._communitiesService.getCommunitiesState().subscribe (
        communities => {
               for(var com of communities){
                   if( (communityId && communityId!="" &&  com.communityId == communityId
@@ -254,7 +254,6 @@
                       !(communityId && communityId!="" &&  com.communityId  == communityId)
                       &&
                       this.managerOfCommunities && this.subscriberOfCommunities)) {
-
                     break;
                   }
                 if(Session.isLoggedIn() && com['status'] != "hidden"){
@@ -314,7 +313,6 @@
                     items: []
                     }
                 ];
-
                 }
 
               }
