Added list_files method and refactored is_empty? to use it