Moved console emulation to base code