Code snippet as fully-working angular directive

* Replaced `CodeMirror` directive with `angular-highlightjs`
* Small refactors of controllers and views