Fixed tile removal feature, track usedIds per-tileset spawning across
different maps

Also refactored and removed old unused code.