Moved make-spaces (formerly spaces) to its own function