Fixed some typos and added documentation