Added include of caretstate.js