set default log level to info.
spelling fix.
Remove comments and the readystate wait.
remove stupid debug output
Fix faulty logic.