added codemirror highlighting, changed switching tabs to templates