Added a code demo and fixed some typos.