refactor World and Obstacle