cleaned up example and added codemirror
primary
auto select first example