Level generation working after much hassle