fixed some typos.
Ready for first test.
Several bug fixed, but still need a little work.