Wrote better intro and fixed code