Implemented the list command.