 #Entry point
 root.go = ->
   g.ve = new VisualEnvironment(document.getElementById("surface"))
-  ebox = new ElementBox(g.ve)
-  surface = new Surface(g.ve)
+  g.ve.ebox = new ElementBox(g.ve)
+  g.ve.surface = new Surface(g.ve)
   g.ve.render(g.ve)
 
 #Global event handlers

  placingMove: (event) ->
    @updateMouse(event)


    @baseRect = new Shapes.Rectangle(0x262626, 0, 0, 0, @width, @height)
    @baseRect.obj3d.userData = this
    @ve.scene.add(@baseRect.obj3d)

  addElement: (ef, x, y) ->
    e = new ef.constructor(@baseRect, x, y, 5)
    @ve.render()
    e

#VisualEnvironment holds the state associated with the Threejs objects used
#to render Surfaces and the ElementBox. This class also contains methods
