Refactoring: separating world and uiworld