Refactor World class
Fix compile error