Remove dead code and fix space.py