Switch to tern and codemirror in npm
Add new tern dependency
Update agency definitions to correctly return this
Fix return type in definition of text