The Hubble Space Telescope: What Went Wrong, How We Fixed It, and Its great Discoveries