Fix Space memory leak & unify.