new functionality for main and split map and dice from main2. main2.js no longer valid.