Removed duplicate code from a merge.
Adding more parsing for wonder and stages, with tests.