Rewrote level generation code to improve performance. Will use more
memory, but it will take a lot less time.