Added comments on the example and fixed a couple errors