fixed typos
fixed parse errors
some error checking added to the project