Add error handling to editor
Clean up editor code
Switch autoformat plugin to use tabs