How the modern world was shaped by epidemics 500 years ago