Refactored to new space module