typos and shameful coding errors fixed
more fixes for typos and shameful errors