Factor out the function to extract egg info, Fix output