World mechanics implementation and related refactoring changes