Refactor xcon constructor

window.console now passed in as constructor function context instead of declared literally;
refactor part of run() method;
changed name of constructor function