Removed old API generator and fixed generator tests
diff --git a/views/ngXosLib/apigen/ngResourceTemplate.handlebars b/views/ngXosLib/apigen/ngResourceTemplate.handlebars
index d326a51..6048669 100644
--- a/views/ngXosLib/apigen/ngResourceTemplate.handlebars
+++ b/views/ngXosLib/apigen/ngResourceTemplate.handlebars
@@ -1,14 +1,16 @@
-'use strict';
-{{#if description}}
+(function() {
+  'use strict';
+  {{#if description}}
 
-/*
- * {{description}}
- */
-{{/if}}
+  /*
+   * {{description}}
+   */
+  {{/if}}
 
-angular.module('{{ngModule}}')
-{{#each resources}}
-.service('{{name}}', function($resource){
-  return $resource('{{param.href}}'{{#if param.name}}, { {{param.name}}: '@id' }{{/if}});
-})
-{{/each}}
\ No newline at end of file
+  angular.module('{{ngModule}}')
+  {{#each resources}}
+  .service('{{name}}', function($resource){
+    return $resource('{{param.href}}'{{#if param.name}}, { {{param.name}}: '@id' }{{/if}});
+  })
+  {{/each}}
+})();
\ No newline at end of file