-#
-# JavaScript Language Utility Methods
-#
-util = {}
-
-util.extend = (obj, source) ->
+util = require("util")
+
+
+###
+  JavaScript Language Utilities
+  ------------------------------------------------------------------------------------------
+###
+extend = (obj, source) ->
   # ECMAScript5 compatibility based on: http://www.nczonline.net/blog/2012/12/11/are-your-mixins-ecmascript-5-compatible/
   if Object.keys
     keys = Object.keys(source)

# shuffles the order of the given object or array
# optionally takes a random number generator object
# returns the shuffled object
util.shuffle = (object, rng) ->
  rng = Math unless rng?
  i = object.length
  while i

  object


module.exports =
  extend: extend
  clone: clone
  EXObject: EXObject

  removeElement: removeElement
  shuffle: shuffle
