Updated #all method (cleanup and optimization)