add some controller and functionality
fix codemirror init