Removing extra codemirror code and cleaning up main code.