Rewritten get_all_slabs.