     @editThang thangID: e.thang.id
 
   onRandomizeTerrain: (e) ->
-    console.log 'here'
     @thangsBatch = []
-    for id in @randomizeThangIDs?
-      @thangsTreema.delete "id=#{id}"
-    @randomizeThangIDs = []
+    nonRandomThangs = (thang for thang in @thangsTreema.get('') when not /Random/.test thang.id)
+    @thangsTreema.set '', nonRandomThangs
     for thang in e.thangs
       @selectAddThangType thang.id
       @addThang @addThangType, thang.pos, true

    @editThang thangID: id if id

  batchInsert: ->
    @thangsTreema.set '', @thangsBatch
    @thangsBatch = []

  addThang: (thangType, pos, batchInsert = false) ->
    thangID = Thang.nextID(thangType.get('name'), @world) until thangID and not @thangsTreema.get "id=#{thangID}"
    @randomizeThangIDs.push thangID
    if @cloneSourceThang
      components = _.cloneDeep @thangsTreema.get "id=#{@cloneSourceThang.id}/components"
      @selectAddThang null

    thang = thangType: thangType.get('original'), id: thangID, components: components
    if batchInsert
      @thangsBatch.push thang
    else
      @thangsTreema.insert '', thang

  editThang: (e) ->
