made some changes @csain suggested and fixed few typos