Complete the codes and slides for Lec. 5. And fix several bugs in the previous codes sections.