Stanford's CS193P Lecture 6 Demo reimplementation.