Refactor spaces