Spaces refactoring