Refactored World into a class.