Code of World.java slight optimizations.