fixed some codemirror integration problems, still need to fix word count