add ng-constant for environment settings and a few clean up