Some of these changes were supposed to be in the last commit.  Others fix an issue where more than two layers would break the game