Refactor variable names.
Adds console polyfill.