Refactor interfaces to handle the differences between search and show command