Replaced CodeMirror with Ace Editor. Fixes #11.
Fixed stupid mistake that surprisingly hadn't been noticed yet.
Tidied up examples a little bit.
Merge pull request #12 from DanielGibbsNZ/master

Switched editor to Ace for better error message display.