Added the modal for the code edit modal.

Worked out some weird bugs and handled the issues with the infinite digest cycle. Working on an idea for how to handle the sort order with angular's filter.