added support for console.warn and removed misc. console logs that would break script.