Merge pull request #17 from adam-vessey/7.x

Fix JS errors due to bad indicies from core code.
Move config out, and use general highlighting code.