Comment typo fix
Simplified error checking
Removed unneeded error number
Corrected missing semicolon typo
Simplified error checking, reoved dead code, improved multi-terminator
prevention
Removed dead comment