Fix code snippet formatting and typos.