Fix when window[callback] is not a function.
Remove superfluous console.log.
Fixing some stuff