Refactor merginf cubes for loop
  * add CubeCreature prototype with mergeCubes function
  * make code more OO
  * get some of the for loops inside functions