fixes for $.extend(); cm tokenizer
Merge pull request #7 from redmunds/fix-mode-detection

More Sprint 21 fixes