         eqnull: true,
         shadow: true
       },
-      files: [
-        'build/**/*.js'
-      ]
+      core: {
+        src: [
+          'build/scripts/**/*.js',
+          '!build/scripts/<%= pkg.name %>/ui.js',
+          '!build/scripts/<%= pkg.name %>/ui/**/*.js'
+        ]
+      },
+      ui: {
+        src: [
+          'build/scripts/<%= pkg.name %>/ui.js',
+          'build/scripts/<%= pkg.name %>/ui/**/*.js'
+        ]
+      }
     },
 
     # Minified distribution

  grunt.loadNpmTasks 'grunt-contrib-uglify'
  grunt.loadNpmTasks 'grunt-contrib-watch'

  grunt.registerTask 'default', ['watch']
  grunt.registerTask 'build',   ['coffee', 'jshint', 'concat']

        options: {
          banner: '<%= meta.ui.banner %>'
        },
        files: {
          'dist/scripts/<%= pkg.name %>-ui.js': [
            'vendor/angular/angular.js',
            'vendor/threejs/build/three.js',
            'vendor/threejs/examples/js/controls/OrbitControls.js',
            'build/scripts/<%= pkg.name %>/ui.js',
            'build/scripts/<%= pkg.name %>/ui/**/*.js'
          ]
        }
      }
    },

