Console commit

Added console global scope variable for debugging purposes
Bugs

Bugs found via Firebug console