spaces: Some more optimizations