Improved cutting script to support multiple tilesets