Merge execute_output and display_data, since they are essentially the same