Slight change: added organizeStacks() method to Space