Improved the scripting system.
Improved the tile management.