Changed how the Javascript handler works; Added history to Console